import smtplib

smtpObj = smtplib.SMTP_SSL('smtp.qq.com', 465)
print(smtpObj.ehlo())
smtpObj.login(user='304482731@qq.com', password='ebnpwdshynqkbgdc')

smtpObj.sendmail('304482731@qq.com', 'zhangxb@cmft.com', 'Subject: So long.\nDear Alice, so long and thanks for all the fish. Sincerely, Bob')
{}

smtpObj.quit()